/*
 * Copyright (c) 2006, 2022, webrx.cn All rights reserved.
 *
 */
package cn.webrx;

import java.text.SimpleDateFormat;

/**
 * <p>Project: javase202202 - Switch1
 * <p>Powered by Lisi On 2022-06-01 09:50:36
 * <p>Created by IntelliJ IDEA
 *

 * @version 1.0
 * @since 17
 */
public class Switch1 {
    public static void main(String[] args) {
        int i = 1;
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");

        //相当于 if(){}else if(){}else if(){}else{}
        switch (i) {
            case 0:
                System.out.println("000");
                break;
            case 1:
                System.out.println("111");
                break;
            case 2:
                System.out.println("222");
                break;
            default:
                System.out.println("default相当于else");
                break;
        }

    }
}
